Web application router

ABSTRACT

A computer implemented method includes receiving a request that includes an action parameter and identifying a procedure that is associated with the value of the action parameter. If a procedure is identified, the identified procedure is executed. If a procedure is not identified, a script associated with the value of the action parameter is dispatched.

TECHNICAL FIELD

[0001] This description relates to software applications that use a web communications protocol such as Hypertext Transfer Protocol (HTTP) to enable communications across a network.

BACKGROUND

[0002] With the advent of the Internet, the number of web applications (i.e., applications that use HTTP or a similar network communications protocol) has grown significantly. The development of web applications, therefore, has become increasingly important to software companies competing in the Internet age.

[0003] Web application development using a model-view-controller paradigm typically includes tasks performed by a user interface developer and a backend developer. The user interface developer is the developer of the presentation or view logic. The backend developer is the developer of the control logic which includes the code that enables the web application to access or receive data from backend systems, process the data, and send processed data back to the backend systems. The backend systems include computing systems that may be queried to obtain data as necessary while executing a web application. Such data may include, for example, login information and customer data.

[0004] Web application development may be delayed because of the coupling and interdependence of the tasks of the user interface developer and the backend developer. For example, a user interface developer may be forced to wait for backend integration to progress further before being able to continue developing the user interface.

SUMMARY

[0005] In one general aspect, a computer implemented method includes receiving a request that includes an action parameter and identifying a procedure that is associated with the value of the action parameter. If a procedure is identified, the identified procedure is executed. If a procedure is not identified, a script associated with the value of the action parameter is dispatched.

[0006] Implementations may include one or more of the following features. For example, the request may be a hypertext transfer protocol request. The procedure may be a method used in an object oriented programming language or a function used in a procedural programming language. After an identified procedure is executed, a script may be dispatched if executing the procedure does not result in a response being committed.

[0007] Identifying a procedure that is associated with the value of the action parameter may include searching a group of procedures in a program for a procedure that is associated with the value of the action parameter. Searching a group of procedures may include searching a group of procedures in a program for a procedure that has a name equal to the value of the action parameter. Searching a group of procedures may include searching a group of procedures in a program for a procedure that is associated with the value of the action parameter and that includes code that implements application control logic. Searching a group of procedures may include searching a group of procedures in a program for a procedure that is associated with the value of the action parameter and that includes code that enables communications with backend systems.

[0008] Searching a group of procedures may include searching a group of methods in a class for a method that is associated with the value of the action parameter. The method may be programmed in Java™

[0009] Searching a group of procedures may include searching a group of functions in a program for a function that is associated with the value of the action parameter. The function may be programmed in Perl.

[0010] Dispatching to a script associated with the value of the action parameter may include dispatching to a script saved under a file name corresponding to the value of the action parameter. Dispatching to a script may include dispatching to a script may include dispatching to a script that is associated with the value of the action parameter and that includes code that implements presentation logic. The presentation logic may implement a user interface. The user interface may be a voice user interface operable to communicate with a user of a voice communication device. The voice communication device may be a landline phone, a wireless phone, a voice-enabled personal digital assistant, or a voice-enabled computer.

[0011] The script that is associated with the value of the action parameter may include markup language code. The markup language code may include hypertext markup language, VoiceXML, SALT, or markup language used to communicate with wireless communication devices. The markup language used to communicate with wireless communication devices may include wireless markup language.

[0012] In another general aspect, a computer system includes a web application computer configured to receive a request that includes an action parameter and configured to identify a procedure that is associated with the value of the action parameter. The web application computer is further configured to execute the procedure if a procedure is identified and dispatch to a script associated with the value of the action parameter if a procedure is not identified.

[0013] Implementations may include one or more of the following features. For example, the web application computer may be further configured to send a response. The web application may be further configured to dispatch to the script after execution of the procedure if execution of the procedure does not result in a response being committed.

[0014] The web application computer may be configured to dispatch to a script including markup language used for communications with a wireless communication device. The markup language may include wireless markup language code. The web application application computer may be configured to dispatch to a script including VoiceXML or SALT code.

[0015] The computer system may further include a gateway computer. The gateway computer may be configured to communicate with a wireless communication device. The gateway computer may be a wireless application protocol gateway. The gateway computer may be a voice gateway configured to communicate with a voice communication device.

[0016] The details of one or more implementations are set forth in the accompanying drawings and the description below. Other features will be apparent from the description and drawings, and from the claims.

DESCRIPTION OF DRAWINGS

[0017]FIG. 1 is a block diagram of a communications system using web application routing logic to provide a flexible platform for web applications.

[0018]FIG. 2 is a flow chart of a process for developing a web application using web application routing logic.

[0019]FIGS. 3A and 3B are a flow chart of a process for using web application routing logic to respond to HTTP requests.

[0020]FIG. 4 is a block diagram of an implementation of the communications system of FIG. 1 that uses web application routing logic to provide a flexible platform for web-based voice applications.

[0021]FIG. 5 is a block diagram of a detailed implementation of the communications system of FIG. 4.

[0022]FIGS. 6A and 6B are a flow chart of a process for using web application routing logic to begin communications with a user of a voice communication device.

[0023]FIGS. 7A and 7B are a flow chart of a process for using web application routing logic to communicate with a user of a voice communication device.

DETAILED DESCRIPTION

[0024] Referring to FIG. 1, a communications system 100 for using web application routing logic to provide a flexible platform for web application development includes a client system 110, a network 120, and a web application system 130. The client system 110 is configured to send requests and receive responses from the web application system 130. For example, the client system 110 may send and receive data using Hypertext Transfer Protocol (HTTP) or another protocol that enables web communications across a network. The HTTP responses are processed to communicate with a user of the client system 110. The client system 110 includes a device 110A capable of executing instructions under the command of a controller 110B. The device 110A may be a general purpose computer, such as a workstation or a personal computer, a personal digital assistant (PDA), a special purpose computer, an intelligent mobile phone, a pager, or a set top box.

[0025] The controller 110B commands and directs communications between the device 110A of the client system 110 and the web application system 130. The controller 110B may include one or more software or hardware applications that enable a user of the client system 110 to communicate using HTTP with the web application system 130. For example, the controller 110B may be a browser application on a personal computer that sends HTTP requests to the web application system 130, receives HTTP responses from the web application system 130, and processes hypertext markup language (HTML) code in the HTTP responses to display a web page or otherwise communicate with the user. The device 110A is connected to the controller 110B by a wired, wireless or virtual (i.e., when the controller is software running on the device) data pathway 110C capable of delivering data. In some implementations, the device 110B is a web browser running on the device 110A which is a personal computer.

[0026] In another implementation, the client system 110 is configured to communicate with a gateway (not shown) rather than with the web application system 130. In this implementation, the client system 110 exchanges data with the gateway which, in turn, communicates with the web application system 130 using HTTP. For example, the client system 110 may be a voice communication device, such as, for example, a landline phone, that exchanges voice data with a voice gateway, or the client system 110 may be a wireless device, such as, for example, a wireless phone, a pager or a radio transceiver, that exchanges data with a Wireless Application Protocol (WAP) gateway.

[0027] The network 120 is configured to enable direct or indirect communications between the client system 110 and the web application system 130. Examples of the network 120 include the Internet, Wide Area Networks (WANs), Local Area Networks (LANs), analog or digital wired and wireless telephone networks (e.g., Public Switched Telephone Network (PSTN), Integrated Services Digital Network (ISDN), and Digital Subscriber Line (xDSL)), radio, television, cable, satellite, and/or any other delivery or tunneling mechanism for carrying data.

[0028] The web application system 130 is a computer system configured to receive requests from the client system 110 over the network 120, process the requests in accordance with a web application that includes web application routing logic, and send corresponding responses to the client system 110. In an exemplary implementation, the requests and responses are communicated using HTTP.

[0029] In another implementation, the web application system 130 receives HTTP requests and sends HTTP responses to a gateway (not shown) that communicates with the client system 110. In this implementation, the client system 110 does not communicate with the web application system 130 directly using HTTP but rather communicates with the gateway which, in turn, communicates with the web application system 130 using HTTP. The gateway may be, for example, a voice gateway that is configured to process Voice Extensible Markup Language (VoiceXML) or Speech Application Language Tags (SALT) and exchange voice data with the client system 110. The gateway also may be a gateway configured to communicate with wireless communication devices. For example, the gateway may be a WAP gateway configured to process Wireless Markup Language (WML) and exchange data with the client system 110 using WAP. The gateway may be local to the web application system 130, local to the client system 110, or remote to both the web application system 130 and the client system 110 but communicatively coupled to them through network 120.

[0030] The web application includes a set of scripts and an HTTP response algorithm for responding to HTTP requests. The scripts are written in a scripting language (e.g., JavaServer Page™ (JSP), Active Server Pages™ (ASP), or PHP: Hypertext Preprocessor (PHP)) and typically include markup language code (e.g., HTML, VoiceXML, SALT, or WML). The HTTP response algorithm includes the web application routing logic and may be implemented as a program written in a procedural programming language (e.g., Perl or C) or, alternatively, may be implemented as a class written in an object-oriented programming language (e.g., C++, Visual Basic, or Java™).

[0031] The web application may be developed using a model-view-controller paradigm. In a model-view-controller paradigm, the functions of the program or the methods of the class implement application control logic. The application control logic coordinates the execution of scripts (i.e., the functions or methods may dispatch to one or more scripts during execution), accesses or receives selected data from local or remote computer systems or storage devices, processes the data, and sends the processed data to local or remote computer systems or storage devices. The scripts implement presentation (or view) logic. The presentation logic provides a user interface that enables a user of the client system 110 to interact with the web application.

[0032] The HTTP response algorithm includes web application routing logic that examines the value of an action parameter in a received HTTP request to determine which methods or functions and/or scripts should be executed in response to the received HTTP request. The action parameter is an additional parameter contained in the HTTP request that identifies the method, function, or script that should be executed by the web application routing logic. Other parameters contained in the HTTP request include a Universal Resource Locator (URL), a web context, and a web application name. For example, an HTTP request may be formatted as follows: http://www.mysite.com/mycontext/myapp?action=welcome. In this example, the HTTP request includes a Universal Resource Locator corresponding to “www.mysite.com,” a web context corresponding to “mycontext,” a web application name corresponding to “myapp,” and an action parameter set to “welcome.”If a method or function corresponds to the value of the action parameter, then the web routing logic executes that method or function. If execution of that method or function does not result in an HTTP response being committed (i.e., an HTTP response is not prepared by the method or function for subsequent delivery to the client system 110), then the web routing logic dispatches to a script that corresponds to the value of the action parameter upon completion of the execution of the method or function. The application also dispatches to a script that corresponds to the value of the action parameter if the web application routing logic finds no method or function that corresponds to the value of the action parameter. In one implementation, a method, function, or script corresponds to the value of the action parameter if the value of the action parameter is a label or name used to store, invoke, or otherwise reference the corresponding method, function, or script. For example, a method named “authen” corresponds to an action parameter set to “authen.”

[0033]FIG. 2 shows a process 200 for using web application routing logic to facilitate web application development by substantially decoupling the tasks of the user interface developer from those of the backend developer. The web application development begins by creating a set of initial scripts and creating a program or a class that contains web application routing logic and few or none of the functions or methods necessary for interactions with backend systems (202). The initial scripts present to the user of the client system 110 artificial or simulated results of interactions with backend systems.

[0034] Each script is associated with a value of an action parameter (204). In one implementation, associating a script with a value of the action parameter is accomplished by simply saving the script under a file name. The file name of the script (excluding extension) is the value of the action parameter that corresponds to that script (e.g., if the script is saved as “welcome jsp”, the value of the corresponding action parameter is “welcome.”).

[0035] In the course of application development, the user interface developer creates new scripts (206) and associates the new scripts with values of the action parameter (208). The user interface developer does not need to wait for the backend developer to complete the backend integration and the corresponding control logic prior to creating scripts. After a user interface developer creates a new script, the web application routing logic in the class or program automatically dispatches to the script when an HTTP request including an action parameter with a value corresponding to the new script is received from the client system 110. The web application routing logic eliminates the need to change the dispatcher or to add additional code when adding a new script.

[0036] As the backend integration progresses, the backend developer creates new functions or methods in the class or program (210) and enables the execution of the new functions or methods to replace the execution of scripts by simply labeling, naming, or otherwise associating the new methods or functions with the value of the action parameter that was previously associated with the scripts (212). The scripts that present artificial or simulated results of interactions with backend systems are thereby replaced by new methods or functions developed by the backend developer that perform actual interactions with the backend systems and that instruct the same or other scripts to present the actual results of interactions with the backend systems to users. Typically, the initial scripts display default values of variables until replaced by a new function or method. The new function or method interacts with backend systems, assigns actual values to the variables, and dispatches to the same initial scripts which now present the actual rather than default values to users.

[0037] For example, when developing a web-based banking application, a script may be manually generated to present to the user an artificial bank account balance and may be executed in response to an HTTP request from the client system 110 that includes an action parameter set to “bankacct.” When the backend developer completes the method or function that allows the web application system 130 to access actual bank account information from the computer systems of the bank (i.e., backend systems), execution of the script that presents an artificial bank account balance is replaced by execution of a method or function that accesses and coordinates presentation of an actual bank account balance to the user. The method or function that accesses and coordinates the presentation of an actual bank account balance to the user is simply inserted into the web application and labeled, named, or otherwise associated with the action parameter value “bankacct.” The web application routing logic ensures that the method or function rather than the script executes when a received HTTP request includes an action parameter set to “bankacct.”

[0038] In this manner, the web application routing logic enables the user interface development (206, 208) of a web application to be substantially decoupled from the backend development (210, 212) of a web application. The user interface developer is able to develop the user interface of the web application relatively independently from the development of the control logic and backend integration. The backend developer is able to complete the control logic and backend integration and smoothly insert the corresponding functions and methods into the program or class of the web application without significantly modifying or disrupting the user interface developed by the user interface developer.

[0039]FIGS. 3A and 3B show a process 300 for using web application routing logic to respond to HTTP requests. For convenience, particular components described with respect to FIG. 1 are referenced as performing the process 300. However, similar methodologies may be applied in other implementations where different components are used to define the structure of the system, or where the functionality is distributed differently among the components shown by FIG. 1. Furthermore, process 300 assumes that the HTTP response algorithm of the web application is implemented as a class rather than as a program. However, the methodology disclosed by process 300 may be similarly applied to web applications in which the HTTP response algorithm is implemented as a program.

[0040] The process 300 assumes that the class is already instantiated (i.e., loaded). In general, instantiation of a class typically occurs prior to the web application server 130 receiving HTTP requests related to that class from the client system 110.

[0041] The client system 110 sends an HTTP request to the web application system 130 (302). The HTTP request includes a uniform resource locator (URL), a web context, a web application name, and an action parameter. The web application system 130 receives the HTTP request (304) and identifies a class related to the web context and the web application specified by the HTTP request (306). In one implementation, the web application system 130 identifies a class related to the web context and the web application name by accessing a data store containing data records storing names of classes and that may be indexed or otherwise accessed based on web context and web application name.

[0042] The web application system 130 executes an HTTP request method in the identified class (308). The HTTP request method is a method that is executed each time an HTTP request that includes a web context and a web application name related to the identified class is received from the client system 110. In this implementation, the HTTP request method contains the web application routing logic. The web application developer typically is not permitted to edit the contents of the HTTP request method.

[0043] The HTTP request method invokes (i.e., executes) a web application service method (310). The web application service method, unlike the HTTP request method, is a method that may be edited by the web application developer. The web application service method is executed every time the HTTP request method is executed (i.e., every time an HTTP request including a web context and a web application name related to the identified class is received from the client system 110). In a simple example, a developer may code the web application request method to increment a counter, and thereby keep track of the number of HTTP requests received by the web application system 130 that include a web context and a web application name related to the identified class.

[0044] When the web application service method finishes executing, the web application system 130 returns to the HTTP request method and executes the web application routing logic (312). The web application routing logic determines whether a method in the identified class corresponds to the value of the action parameter included in the HTTP request (314). In one implementation, a method in the identified class corresponds to the value of the action parameter if the name of the method is the same as the value of the action parameter.

[0045] If no method in the identified class corresponds to the value of the action parameter in the HTTP request, the web application routing logic dispatches to a script corresponding to the value of the action parameter (316). The web application system 130 renders markup language code from the script and includes the markup language code in an HTTP response (318). The HTTP response is sent to the client system 110 (324).

[0046] If a method in the identified class corresponds to the value of the action parameter in the HTTP request, the web application routing logic executes the method that corresponds to the value of the action parameter (320). Upon completion of the method, the web application routing logic determines whether an HTTP response was committed by the method (322).

[0047] If an HTTP response was committed by the method, then the web application routing logic sends the HTTP response to the client system 110 (324). If no HTTP response was committed by the method, then the web application routing logic dispatches to a script corresponding to the value of the action parameter (316). The web application system 130 renders markup language code from the script and includes the markup language code in an HTTP response (318) which is then sent to the client system 110 (324).

[0048] The client system 110 receives the HTTP response (326) and processes the markup language code to communicate with a user (328). In another implementation, a gateway, rather than the client system 110, sends HTTP requests (302), receives HTTP responses (326), and processes the markup language code to communicate with a user of the client system 110 (328).

[0049]FIG. 4 shows an implementation 400 of the communications system of FIG. 1 directed to using web application routing logic to provide a flexible platform for web-based voice application development. The communications system 400 includes a voice communication device 410, a network 420, a voice application system 430, and a voice gateway 440. The voice communication device 410, the network 420, and the voice application system 430 are described broadly above with respect to FIG. 1. In particular, the voice communication device 410, the network 420, and the voice application system 430 typically have attributes comparable to those described with respect to the client system 110, the network 120, and the web application system 130.

[0050] The voice communication device 410 is a device able to interface with a user to transmit voice signals across a network such as, for example, a landline phone, a wireless phone, a voice-enabled personal digital assistant (PDA), or a voice-enabled computer.

[0051] The network 420 may include a circuit-switched voice network, a packet-switched data network, or any other network able to carry voice. For example, circuit-switched voice networks may include the public switched telephone network (PSTN), and packet-switched data networks may include networks based on Internet protocol (IP) or asynchronous transfer mode (ATM), and may support voice using, for example, Voice-over-IP, Voice-over-ATM, or other comparable protocols used for voice data communications.

[0052] The voice application system 430 includes a voice application server and all computer systems that interface and provide data to the voice application server. The voice application system 430 is configured to receive HTTP requests from the voice gateway 440, process the HTTP requests in accordance with a web-based voice application that includes web application routing logic, and send corresponding HTTP responses to the voice gateway 440. The HTTP responses sent to the voice gateway 440 include voice markup language code, such as, for example VoiceXML or SALT code, that is rendered by the voice gateway 440 to communicate with a user of the voice communication device 410.

[0053] The voice gateway 440 is a gateway configured to receive user calls from voice communication devices 410 via the network 420 and respond to the user calls in accordance with the web-based voice application. Specifically, the voice gateway 440 generates HTTP requests based on a user call, sends the HTTP requests to the voice application system 430, receives corresponding HTTP responses from the voice application system 430, and renders the voice markup language code in the HTTP responses to communicate with the caller.

[0054]FIG. 5 shows a communications system 500 similar to the communications system 400 but illustrating in greater detail an implementation of the voice application system 430 and the voice gateway 440. The communications system 500 includes a voice communication device 510, a network 520, a voice application system 530, and a voice gateway 540. The voice communication device 510, the network 520, the voice application system 530, and the voice gateway 540 are described broadly above with respect to FIG. 4. In particular the voice communication device 510, the network 520, the voice application system 530, and the voice gateway 540 typically have attributes comparable to those described with respect to the voice communication device 410, the network 420, the voice application system 430, and the voice gateway 440 of FIG. 4.

[0055] The voice application system 530 includes a voice application server 532 that communicates with the voice gateway 540, a data store 534, and one or more backend systems 536. The voice application server 532 provides the execution environment for processing the web-based voice application. The voice application server 532 receives HTTP requests from the voice gateway 540, processes the HTTP requests in accordance with a web-based voice application that includes web application routing logic, and sends corresponding HTTP responses that include voice markup language code to the voice gateway 540. The voice application server 532 may be local to the voice gateway 540 or may be located anywhere across a network accessible by the voice gateway 540.

[0056] The data store 534 is a storage device that stores files necessary for execution of the web-based voice application. Such files may include script files, prompt files, grammar files, and text-to-speech (TTS) text files.

[0057] Script files are text files that store the scripts of the web-based voice application. A script file includes a series of embedded tags. The tags indicate which part of the text file defines a prompt used to “speak” to the caller and which part defines a grammar used to “hear” and understand the spoken response of the caller. Script files also generally contain limited logic that controls the sequence and defines rules for how to respond to conditions, such as misunderstood speech or a lack of speech from the caller. The script files are processed by the voice application server 532 to render voice markup language code. The rendered voice markup language code is then sent in an HTTP response to the voice gateway 540 for further processing by an interpreter program 540 b.

[0058] Prompt, grammar, and TTS text files are accessed by the interpreter program 540 b of the voice gateway 540 when processing the voice markup language code received in an HTTP response from the voice application server 532. When executing a prompt instruction, the interpreter program 540 b either accesses a prompt file that contains voice data that is directly “spoken” to the caller or, alternatively, accesses a TTS text file that is spoken to the user via the text-to-speech engine 540 d of the voice gateway 540. Audio data stored in prompt files may be formatted in WAV or other audio data formats. When executing a grammar instruction, the interpreter program 540 b accesses grammar files that contain a specification of the various ways in which a caller might respond to a prompt. Grammar files may be in a custom format specific to the speech recognition engine 540 e or may be written, for example, in standard Java Grammar Specification Format (JGSF) or Speech Recognition Grammar Specification 1.0 extensible markup language (XML) or augmented Backus-Naur forms (ABNF).

[0059] The data store 534 may be external to or located inside the voice application server 532 or the voice gateway 540. Prompt and grammar files may be cached at the gateway 540 to decrease access time. The voice gateway 540 may also receive the prompt and grammar files from the data store 534 or from the voice application server 532 which obtains them from the data store 534. Alternatively, the voice gateway 540 may receive the prompt and grammar files from a completely different web server.

[0060] The backend systems 536 include computing systems in the computing environment of the voice application server 532 that may be queried by the application server to obtain data as necessary while executing a voice application. Such data may include, for example, login information and customer data.

[0061] The voice gateway 540 includes a telephony services and signal processing component 540 a, an interpreter program 540 b, an audio playback component 540c, a text-to-speech generation component 540 d, a speech recognition engine 540 e, and a client services component 540 f.

[0062] Incoming calls are answered by the telephony services and signal processing component 540 a of the voice gateway 540. The voice gateway 540 is provisioned in a manner similar to an interactive voice response (IVR) system and is usually located “downstream” of a private branch exchange (PBX) or automatic call director (ACD). This configuration allows callers to request transfer to a live operator if they experience problems. The voice gateway 540 also may be located at the customer site in front of the PBX or ACD (to save having to buy more ports on the PBX or ACD), or at the premises of a dedicated application service provider (ASP).

[0063] The interpreter program 540 b is responsible for sending HTTP requests to and receiving HTTP responses from the voice application server 532, and processing voice markup language code to communicate with a caller. Processing voice markup language code to communicate with a caller includes generating outgoing speech or prompts using the audio playback component 540 c and the text-to-speech generation component 540 d of the voice gateway 540 and listening to spoken responses from the caller using the speech recognition engine 540 e. The speech recognition engine 540 e is equipped with or has access to grammars that specify the expected caller responses to a given prompt. The prompts that are generated in response to the spoken input of the caller vary depending on the caller response and whether or not it is consistent with a grammar. In this manner, the voice gateway 540 is able to simulate a conversation with the caller.

[0064] In typical operation, the telephony services and signal processing component 540 a of the voice gateway 540 receives a call from a caller and obtains caller information. The client services component 540 f relates the caller information (e.g., Automatic Number Identification (ANI) information) to a URL, a web context, and a web application name, and sends an HTTP request including the URL, the web context, and the web application name (and optionally an action parameter) to the voice application server 532. The voice application server 532 receives the HTTP request, processes the HTTP request in accordance with a web-based voice application, and sends an HTTP response that includes rendered voice markup language code to the voice gateway 540. The voice gateway 540 parses the received voice markup language code using the interpreter program 540 b. The gateway 540 parses the voice markup language code by searching and executing voice-specific instructions. For example, the first voice-specific instruction may be a prompt instruction. The prompt instruction may be executed either by accessing and playing an audio file specified by the prompt instruction or by employing the text-to-speech generation component 540 d to translate and play text included in the prompt instruction.

[0065] The next voice-specific instruction in the voice markup language code may be, for example, a grammar instruction. The interpreter program 540 b of the gateway 540 processes the grammar instruction by handing off control to the speech-recognition engine 540 e which tells the gateway 540 to pause and listen for spoken input from the caller.

[0066] Upon receiving spoken input from the caller, the speech recognition engine 540 e determines whether the spoken input is consistent with the grammar specified by the grammar instruction. If the spoken input is consistent with the grammar, the voice markup language code may direct the voice gateway 540 to execute a prompt instruction tailored to the input. If the spoken input is not consistent with the grammar, the voice markup language code may direct the voice gateway 540 to execute a different prompt instruction that informs the caller that the system does not understand the caller.

[0067] The interpreter program 540 b continues parsing and processing the voice markup language code in this manner. When the script is completed and the necessary responses are collected from the caller, the interpreter 540 b assembles them into an HTTP request that is sent to the voice application server 532. The voice application server 532 processes the HTTP request and may send to the voice gateway 540 more rendered voice markup language code in another HTTP response.

[0068]FIGS. 6A and 6B show a process 600 for using web application routing logic to begin communications with a user of a voice communication device 5 1 0 upon receiving a call from the user. For convenience, particular components described with respect to FIG. 5 are referenced as performing the process 600. However, similar methodologies may be applied in other implementations where different components are used to define the structure of the system, or where the functionality is distributed differently among the components shown by FIG. 5. Furthermore, process 600 assumes that the HTTP response algorithm of the web-based voice application is implemented as a class rather than as a program. However, the methodology disclosed by process 600 may be similarly applied to web applications in which the HTTP response algorithm is implemented as a program.

[0069] The user of the voice communication device 510 makes a call, and the call is routed to the voice gateway 540 by a telecommunications service provider (602). The voice gateway 540 receives the call and identifies a URL, a web context, and a web application name based on caller information (604). The caller information may include the caller telephone number (i.e., the telephone number of the user of voice communication device 510), the number the caller dialed (e.g., through Dialed Number Identification Service(DNIS)) and/or any information that may be derived by accessing data stores based on the caller telephone number, based on other ANI data, or based on DNIS data. The URL, the web context, and the web application name may be determined, for example, by accessing a local or remote data store relating URLs, web contexts, and web application names to caller telephone numbers. The voice gateway 540 sends an HTTP request that includes the URL, the web context, the web application name, and optionally an action parameter to the voice application server 532 (606).

[0070] The voice application server 532 receives the HTTP request (608) and identifies a class related to the web context and the web application name in the HTTP request (610). The voice application server 532 determines whether the class is already instantiated (612).

[0071] If the class is not yet instantiated, the voice application server 532 instantiates the class (614). The voice application server then executes an initialization method in the class (616). The initialization method is a method that is executed when the class is instantiated. The initialization method typically loads resources such as logging system resources, which may, for example, track web application log information, and configuration system resources, which may, for example, initialize parameters and property values used in the web application. The initialization method also may set a default initial script that is processed under certain conditions (see operations 626-644 below) to establish an initial dialog with the user of the voice communication device 510. In the implementation shown in FIGS. 6A and 6B, the initialization method may specify the default initial script by assigning a value to a SetInitialPage parameter. For example, the initialization method may assign the value of “DefaultIndex” to the SetInitialPage parameter. The default initial script is then “DefaultIndex jsp”. The web-based voice application developer typically is not permitted to edit the contents of the initialization method.

[0072] The initialization method also invokes a voice application initialization method (618). The voice application initialization method, unlike the initialization method, is a method that may be edited by the web-based voice application developer. The voice application initialization method is executed every time the initialization method is executed (i.e., every time the corresponding class is instantiated). The voice application initialization method may be edited by the web-based voice application developer to load logging system resources and configuration system resources specific to the web-based voice application. The web-based voice application developer also may edit the voice application initialization method to change the value of the default initial script by assigning a new value to the SetInitialPage parameter (e.g., the SetInitialPage parameter may be assigned the new value of “InitialWelcomePage” which corresponds to an initial script named “InitialWelcomePage. jsp”).

[0073] Upon completion of the voice application initialization method, the voice application server 532 executes an HTTP request method (620). The voice application server 532 also executes the HTTP request method if the identified class is already instantiated. As discussed previously in reference to process 300, the HTTP request method is executed each time an HTTP request is received. The HTTP request method invokes a voice application service method (622). The voice application service method is similar to the web application service method but directed to the needs and requirements of voice applications.

[0074] When the voice application service method finishes executing, the voice application server 532 returns to the HTTP request method and executes web application routing logic (624). The web application routing logic determines whether an action parameter was included in the HTTP request (626). If an action parameter was included in the HTTP request, then the process 600 proceeds to operations 720-736 shown in FIGS. 7A and 7B and discussed below (628).

[0075] If no action parameter was included in the HTTP request, then the web application routing logic determines if there is a method called “index” in the class (630). If there is no method called “index” in the class, the web application routing logic dispatches to a script corresponding to the value of the SetInitialPage parameter specified in the initialization method or in the voice application initialization method (616 or 618 above) (632). The voice application server 532 renders markup language code from the script and includes the markup language code in an HTTP response (634) which is then sent to the voice gateway 540 (640).

[0076] If there is a method called “index” in the class, the web application routing logic executes the method called “index” (636). The web application routing logic, thus, allows a web-based voice application developer to define operations in a method called “index” that will take place at the time a new dialog is initiated with a user of the voice communication device 510. The web application routing logic determines whether an HTTP response was committed by the method called “index” (638).

[0077] If an HTTP response was committed by the method called “index,” then the web application routing logic sends the HTTP response to the voice gateway 540 (640). If no HTTP response was committed by the method, then the web application routing logic dispatches to a script corresponding to the value of the SetInitialPage parameter (632), renders voice markup language from the script (634), and sends an HTTP response to the voice gateway 540 (640).

[0078] The voice gateway 540 receives the HTTP response from the voice application server 532 (642) and processes the voice markup language code to establish a dialog with the user of the voice communication device 510 using prompts and grammars (644). The user of the voice communication device 510 communicates with the voice gateway by responding to the prompts (646).

[0079]FIGS. 7A and 7B show a process 700 for using web application routing logic to communicate with a user of a voice communication device 510. For convenience, particular components described with respect to FIG. 5 are referenced as performing the process 700. However, similar methodologies may be applied in other implementations where different components are used to define the structure of the system, or where the functionality is distributed differently among the components shown by FIG. 5. Furthermore, process 700 assumes that the HTTP response algorithm of the web-based voice application is implemented as a class rather than as a program. However, the methodology disclosed by process 700 may be similarly applied to web applications in which the HTTP response algorithm is implemented as a program.

[0080] The user of the voice communication device 510 communicates with the voice gateway 540 by responding to prompts (702). The voice gateway 540 collects user responses, if any, in accordance with the voice markup language code that the voice gateway 540 is processing (704) and generates an HTTP request that includes a URL, a web context, a web application name, an action parameter, and, in some implementations, additional parameters corresponding to the responses received from the user of the voice communication device 510 (706). The voice gateway 540 then sends the HTTP request to the voice application server 532 (708).

[0081] For example, the voice gateway 540 may be processing voice markup language code rendered from a script called “getUser.jsp” that requests that the user of the voice communication device 510 submit a user identification (ID) and a user password. The user submits the user ID (e.g., “sue”) and the user password (e.g., “123”) using the voice communication device 510, and the voice markup language code instructs the voice gateway 540 to generate and send to the voice application server 532 the following corresponding HTTP request:

[0082] http://www.mysite.com/mycontext/myapp?action=authen&user=sue&password=123. In this example, the HTTP request includes a URL corresponding to “www.mysite.com,” a web context corresponding to “mycontext”, a web application name corresponding to “myapp,” an action parameter set to “authen”, and two additional parameters “user” and “password” set to “sue” and “123,” respectively.

[0083] The voice application server receives the HTTP request from the voice gateway 540 (710) and identifies a class related to the web context and the web application name specified by the HTTP request (712). In one implementation, the voice application server 532 identifies a class related to the web context and the web application name by accessing a data store containing data records storing names of classes and that may be indexed or otherwise accessed based on web context and web application name.

[0084] The voice application server 532 executes an HTTP request method in the identified class (714). As discussed previously in reference to process 300, the HTTP request method is executed each time an HTTP request is received. The HTTP request method invokes a voice application service method (716). The voice application service method is similar to the web application service method but directed specifically to voice.

[0085] When the voice application service method finishes executing, the voice application server 532 returns to the HTTP request method and executes web application routing logic (718). The HTTP request method is a method that is executed each time an HTTP request that includes a web context and a web application name related to the identified class is received from the client system 110. In this implementation, the HTTP request method includes the web application routing logic. The web application developer typically is not permitted to edit the contents of the HTTP request method.

[0086] The web application routing logic determines whether a method in the identified class corresponds to the value of the action parameter included in the HTTP request (720). In one implementation, a method in the identified class corresponds to the value of the action parameter if the name of the method is the same as the value of the action parameter.

[0087] If no method in the identified class corresponds to the value of the action parameter in the HTTP request, the web application routing logic dispatches to a script corresponding to the value of the action parameter (722). The voice application server 532 renders markup language code from the script and includes the markup language code in an HTTP response (724). The HTTP response is sent to the voice gateway 540 (730).

[0088] If a method in the identified class corresponds to the value of the action parameter in the HTTP request, the web application routing logic executes the method that corresponds to the value of the action parameter (726). Upon completion of the method, the web application routing logic determines whether an HTTP response was committed by the method (728). If an HTTP response was committed by the method, then the web application routing logic sends the HTTP response to the voice gateway 540 (730). If no HTTP response was committed by the method, then the web application routing logic dispatches to a script corresponding to the value of the action parameter (722). The voice application server 532 renders markup language code from the script and includes the markup language code in an HTTP response (724) which is then sent to the voice gateway 540 (730).

[0089] The voice gateway 540 receives the HTTP response (732) and processes the voice markup language code to continue a dialog with the user of the voice communication device 5 10 using prompts and grammars (734). The user of the voice communication device 510 communicates with the voice gateway 540 by responding to the prompts (736).

[0090] In one implementation of processes 600 and 700, the scripts are written using JavaServer Pages and VoiceXML, and the HTTP response algorithm is written in Java™ as a class that extends a base class that, in turn, extends the javax.servlet.http.HttpServlet class. The class includes the voice application initialization method, the voice application service method, and methods defined by the web-based voice application developer. The base class includes the initialization method and the HTTP request method. The initialization method is the init method of the javax.servlet.http.HttpServlet with modifications that serve to load resources and to set the initial default page. The HTTP request method is the service method of the javax.servlet.http.HttpServlet with modifications that serve to implement the web application routing logic. The class is typically coded by the web-based voice application developer. Because the coding of the base class remains constant between web-based voice applications (i.e., the web application routing logic remains the same regardless of the web-based voice application in which it is used), the base class may be provided to the web-based voice application developer by a third party.

[0091] A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made. For example, the web application routing logic may be applied to coordinate execution of general procedures in a program and is not limited to coordinating execution of just methods and functions. Accordingly, other implementations are within the scope of the following claims. 

What is claimed is:
 1. A computer implemented method comprising: receiving a request that includes an action parameter; identifying a procedure that is associated with the value of the action parameter; if a procedure is identified, executing the identified procedure; and if a procedure is not identified, dispatching to a script associated with the value of the action parameter.
 2. The method of claim 1, wherein the request is a hypertext transfer protocol request.
 3. The method of claim 1, wherein the procedure is a method used in an object oriented programming language.
 4. The method of claim 1, wherein the procedure is a function used in a procedural programming language.
 5. The method of claim 1, wherein identifying a procedure that is associated with the value of the action parameter comprises searching a group of procedures in a program for a procedure that is associated with the value of the action parameter.
 6. The method of claim 5, wherein searching a group of procedures in a program comprises searching a group of procedures in a program for a procedure that has a name equal to the value of the action parameter.
 7. The method of claim 5, wherein searching a group of procedures comprises searching a group of methods in a class for a method that is associated with the value of the action parameter.
 8. The method of claim 7, wherein searching a group of procedures comprises searching a group of methods in a class for a method that is associated with the value of the action parameter and that is programmed in Java™.
 9. The method of claim 5, wherein searching a group of procedures comprises searching a group of functions in a program for a function that is associated with the value of the action parameter.
 10. The method of claim 9, wherein searching a group of procedures comprises searching a group of functions in a program for a function that is associated with the value of the action parameter and that is programmed in Perl.
 11. The method of claim 1, wherein dispatching to a script associated with the value of the action parameter comprises dispatching to a script saved under a file name corresponding to the value of the action parameter.
 12. The method of claim 1, wherein identifying a procedure comprises searching a group of procedures in a program for a procedure that is associated with the value of the action parameter and that includes code that implements application control logic.
 13. The method of claim 1, wherein identifying a procedure comprises searching a group of procedures in a program for a procedure that is associated with the value of the action parameter and that includes code that enables communications with backend systems.
 14. The method of claim 1, wherein dispatching to a script comprises dispatching to a script that is associated with the value of the action parameter and that includes code that implements presentation logic.
 15. The method of claim 14, wherein the presentation logic implements a user interface.
 16. The method of claim 15, wherein the user interface is a voice user interface operable to communicate with a user of a voice communication device.
 17. The method of claim 16, wherein the voice communication device comprises a landline phone, a wireless phone, a voice-enabled personal digital assistant, or a voice-enabled computer.
 18. The method of claim 1, wherein the script that is associated with the value of the action parameter includes markup language code.
 19. The method of claim 18, wherein the markup language code comprises hypertext markup language.
 20. The method of claim 18, wherein the markup language code comprises VoiceXML or SALT.
 21. The method of claim 18, wherein the markup language code comprises markup language used to communicate with wireless communication devices.
 22. The method of claim 21, wherein the markup language used to communicate with wireless communication devices includes wireless markup language.
 23. The method of claim 1, further comprising dispatching to the script after executing the procedure if executing the procedure does not result in a response being committed.
 24. A computer system comprising: a web application computer configured to: receive a request that includes an action parameter; identify a procedure that is associated with the value of the action parameter; execute the procedure if a procedure is identified; and dispatch to a script associated with the value of the action parameter if a procedure is not identified.
 25. The computer system of claim 24, wherein the request is a hypertext transfer protocol request.
 26. The computer system of claim 24, wherein the procedure is a method.
 27. The computer system of claim 24, wherein the procedure is a function.
 28. The computer system of claim 24, wherein the web application computer is further configured to send a response.
 29. The computer system of claim 24, further comprising a gateway computer.
 30. The computer system of claim 29, wherein the gateway computer is a gateway configured to communicate with a wireless communication device.
 31. The computer system of claim 30, wherein the gateway computer is a wireless application protocol gateway.
 32. The computer system of claim 29, wherein the gateway computer is a voice gateway configured to communicate with a voice communication device.
 33. The computer system of claim 24, wherein the web application computer is configured to dispatch to a script including markup language used for communication with a wireless communication device.
 34. The computer system of claim 33, wherein the markup language includes wireless markup language code.
 35. The computer system of claim 24, wherein the web application computer is configured to dispatch to a script including VoiceXML or SALT code.
 36. The computer system of claim 24, wherein the web application computer is further configured to dispatch to the script after execution of the procedure if execution of the procedure does not result in a response being committed. 